﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Symbonix.NorSoNet.Framework;


public partial class Registration : PublicBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
           pnlRegisterStep1.Visible = true;
        }
    }
    protected void lnbSignIn_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            Symbonix.NorSoNet.Security.BLL.Workflow register = new Symbonix.NorSoNet.Security.BLL.Workflow();
           
            Symbonix.NorSoNet.Security.BLL.Options.RegistrationCompleteStatus status=register.RegisterMember(txtUserName.Text.Trim(), txtPassword.Text.Trim(), txtEmail.Text.Trim(), txtFirstName.Text.Trim(), txtLastName.Text.Trim());
            if (status == Symbonix.NorSoNet.Security.BLL.Options.RegistrationCompleteStatus.Success)
            {
                pnlRegisterStep1.Visible = false;
                ResponseMessage1.SetSuccessMessage("Registration Successfull.A confirmation email is sent to your mail box.Please check the mail to activate your account.");
            }
            else
            {
                
                ResponseMessage1.SetFailMessage("Error: " + status .ToString()+ ".Failed to complete registration.Please contact norsonet admin");
            }
            
            
        }
    }
}
